package edu.metrostate.capstonediner;

public class SpicyPepper extends GamePart {

	
	public SpicyPepper() {
		layer = Constants.GAMEPIECE_LAYER;
		width = 32f;
		height = 32f;
		x = ((int)(Math.random() * 3.0)+1) * (Constants.SCREEN_WIDTH / 4f);
		y = 0f;
		texture = Constants.SPICY_PEPPER_TEXTURE;
		hitPoints = 2;
		pointValue = 100;
	}
	
	public SpicyPepper(float startX, float startY) {
		x = startX;
		y = startY;
		layer = Constants.GAMEPIECE_LAYER;
		width = 32f;
		height = 32f;
		texture = Constants.SPICY_PEPPER_TEXTURE;
		hitPoints = 2;
		pointValue = 100;
	}
	
	public void collisionEffect(GamePart collided, Game game){
		game.gainScore(pointValue);
		collided.setHitPoints(collided.getHitPoints() - 1);
		game.startSpicyPepper();
	}

}
